///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 20 2007)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#ifdef WX_PRECOMP

#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#else
#include <wx/wx.h>
#endif //WX_PRECOMP

#include "gui.h"

///////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE( SCFrameGui, wxFrame )
	EVT_TREE_BEGIN_LABEL_EDIT( ID_TREE_SETUP, SCFrameGui::_wxFB_OnTreeSetupBeginLabelEdit )
	EVT_TREE_END_LABEL_EDIT( ID_TREE_SETUP, SCFrameGui::_wxFB_OnTreeSetupEndLabelEdit )
	EVT_TREE_ITEM_MENU( ID_TREE_SETUP, SCFrameGui::_wxFB_OnTreeSetupContextMenu )
	EVT_TREE_SEL_CHANGED( ID_TREE_SETUP, SCFrameGui::_wxFB_OnTreeSetupSelChanged )
	EVT_TREE_SEL_CHANGING( ID_TREE_SETUP, SCFrameGui::_wxFB_OnTreeSetupSelChanging )
	EVT_MENU( wxID_NEW, SCFrameGui::_wxFB_OnFileNew )
	EVT_MENU( wxID_OPEN, SCFrameGui::_wxFB_OnFileOpen )
	EVT_MENU( wxID_SAVE, SCFrameGui::_wxFB_OnFileSave )
	EVT_MENU( wxID_SAVEAS, SCFrameGui::_wxFB_OnFileSaveAs )
	EVT_MENU( wxID_EXIT, SCFrameGui::_wxFB_OnFileExit )
	EVT_MENU( ID_EDIT_ADDCHILD, SCFrameGui::_wxFB_OnEditAddChild )
	EVT_UPDATE_UI( ID_EDIT_ADDCHILD, SCFrameGui::_wxFB_OnUpdateEditAddChild )
	EVT_MENU( ID_EDIT_DELCHILD, SCFrameGui::_wxFB_OnEditDeleteChild )
	EVT_UPDATE_UI( ID_EDIT_DELCHILD, SCFrameGui::_wxFB_OnUpdateEditDeleteChild )
	EVT_MENU( wxID_ANY, SCFrameGui::_wxFB_OnContextSettings )
END_EVENT_TABLE()

SCFrameGui::SCFrameGui( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxVERTICAL );
	
	m_splitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D);
	m_splitter->Connect( wxEVT_IDLE, wxIdleEventHandler( SCFrameGui::m_splitterOnIdle ), NULL, this );
	m_panelSetup = new wxPanel( m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_treeSetup = new wxTreeCtrl( m_panelSetup, ID_TREE_SETUP, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_EDIT_LABELS|wxTR_HAS_BUTTONS);
	bSizer3->Add( m_treeSetup, 1, wxEXPAND, 5 );
	
	m_panelSetup->SetSizer( bSizer3 );
	m_panelSetup->Layout();
	bSizer3->Fit( m_panelSetup );
	m_panelCtrl = new wxPanel( m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizerCtrl = new wxFlexGridSizer( 2, 2, 0, 0 );
	m_sizerCtrl->SetFlexibleDirection( wxBOTH );
	m_sizerCtrl->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_panelCtrl->SetSizer( m_sizerCtrl );
	m_panelCtrl->Layout();
	m_sizerCtrl->Fit( m_panelCtrl );
	m_splitter->SplitVertically( m_panelSetup, m_panelCtrl, 166 );
	bSizer2->Add( m_splitter, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer2 );
	this->Layout();
	m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	m_menubar = new wxMenuBar( 0 );
	m_menuFile = new wxMenu();
	wxMenuItem* menuNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( wxT("&New") ) + wxT('\t') + wxT("CTRL-N"), wxT("Create a new context"), wxITEM_NORMAL );
	m_menuFile->Append( menuNew );
	wxMenuItem* menuOpen = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( wxT("&Open ...") ) + wxT('\t') + wxT("CTRL-O"), wxT("Open a SetupCreator context ..."), wxITEM_NORMAL );
	m_menuFile->Append( menuOpen );
	wxMenuItem* menuSave = new wxMenuItem( m_menuFile, wxID_SAVE, wxString( wxT("&Save") ) + wxT('\t') + wxT("CTRL-S"), wxT("Save the context"), wxITEM_NORMAL );
	m_menuFile->Append( menuSave );
	wxMenuItem* menuSaveAs = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( wxT("Save as ...") ) , wxT("Save the context"), wxITEM_NORMAL );
	m_menuFile->Append( menuSaveAs );
	
	m_menuFile->AppendSeparator();
	wxMenuItem* menuExit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( wxT("E&xit") ) , wxT("Quit the Setup Creator"), wxITEM_NORMAL );
	m_menuFile->Append( menuExit );
	m_menubar->Append( m_menuFile, wxT("&File") );
	
	m_menuEdit = new wxMenu();
	wxMenuItem* menuAddChild = new wxMenuItem( m_menuEdit, ID_EDIT_ADDCHILD, wxString( wxT("Add child...") ) + wxT('\t') + wxT("CTRL-A"), wxT("Add a child to the current item"), wxITEM_NORMAL );
	m_menuEdit->Append( menuAddChild );
	wxMenuItem* menuDeleteChild = new wxMenuItem( m_menuEdit, ID_EDIT_DELCHILD, wxString( wxT("Delete child") ) + wxT('\t') + wxT("CTRL-D"), wxT("Delete the current child and all its children"), wxITEM_NORMAL );
	m_menuEdit->Append( menuDeleteChild );
	m_menubar->Append( m_menuEdit, wxT("&Edit") );
	
	m_menuContext = new wxMenu();
	wxMenuItem* menuSettings = new wxMenuItem( m_menuContext, wxID_ANY, wxString( wxT("Settings") ) + wxT('\t') + wxT("ALT-F7"), wxT("Settings of the context"), wxITEM_NORMAL );
	m_menuContext->Append( menuSettings );
	m_menubar->Append( m_menuContext, wxT("Context") );
	
	this->SetMenuBar( m_menubar );
	
}
BEGIN_EVENT_TABLE( DlgAddChildGui, wxDialog )
	EVT_INIT_DIALOG( DlgAddChildGui::_wxFB_OnInitDialog )
	EVT_BUTTON( wxID_ANY, DlgAddChildGui::_wxFB_OnOK )
END_EVENT_TABLE()

DlgAddChildGui::DlgAddChildGui( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxHORIZONTAL );
	
	wxArrayString m_choiceElementChoices;
	m_choiceElement = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceElementChoices, 0 );
	bSizer5->Add( m_choiceElement, 1, wxALL|wxEXPAND, 5 );
	
	m_btnOK = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer5->Add( m_btnOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	this->SetSizer( bSizer5 );
	this->Layout();
}

DlgSettingsGUI2::DlgSettingsGUI2( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer9;
	bSizer9 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticRNG = new wxStaticText( this, wxID_ANY, wxT("Config file (Relax NG) :"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer4->Add( m_staticRNG, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_filePickerRNG = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT("Select the config file"), wxT("*.rng"), wxDefaultPosition, wxSize( -1,-1 ), wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN );
	fgSizer4->Add( m_filePickerRNG, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticXML = new wxStaticText( this, wxID_ANY, wxT("Setup file :"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer4->Add( m_staticXML, 0, wxALL, 5 );
	
	m_filePickerXML = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL );
	fgSizer4->Add( m_filePickerXML, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizer9->Add( fgSizer4, 1, wxEXPAND, 5 );
	
	m_sdbSizer2 = new wxStdDialogButtonSizer();
	m_sdbSizer2->AddButton( new wxButton( this, wxID_OK ) );
	m_sdbSizer2->AddButton( new wxButton( this, wxID_APPLY ) );
	m_sdbSizer2->AddButton( new wxButton( this, wxID_CANCEL ) );
	m_sdbSizer2->Realize();
	bSizer9->Add( m_sdbSizer2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
	
	this->SetSizer( bSizer9 );
	this->Layout();
}

DlgSettingsGUI::DlgSettingsGUI( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer1;
	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("label") ), wxVERTICAL );
	
	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer4->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrl3 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), 0 );
	fgSizer4->Add( m_textCtrl3, 0, wxALL, 5 );
	
	m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer4->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrl4 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), 0 );
	fgSizer4->Add( m_textCtrl4, 0, wxALL, 5 );
	
	sbSizer1->Add( fgSizer4, 1, wxEXPAND, 5 );
	
	bSizer5->Add( sbSizer1, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxVERTICAL );
	
	bSizer7->Add( bSizer8, 1, wxEXPAND, 5 );
	
	m_button5 = new wxButton( this, wxID_ANY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button5->Enable( false );
	
	bSizer7->Add( m_button5, 0, wxALL, 5 );
	
	m_button6 = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer7->Add( m_button6, 0, wxALL, 5 );
	
	m_button7 = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer7->Add( m_button7, 0, wxALL, 5 );
	
	bSizer5->Add( bSizer7, 0, wxEXPAND, 5 );
	
	this->SetSizer( bSizer5 );
	this->Layout();
}
BEGIN_EVENT_TABLE( SCDocFrameGUI, wxDocParentFrame )
	EVT_TREE_BEGIN_LABEL_EDIT( ID_TREE_SETUP, SCDocFrameGUI::_wxFB_OnTreeSetupBeginLabelEdit )
	EVT_TREE_END_LABEL_EDIT( ID_TREE_SETUP, SCDocFrameGUI::_wxFB_OnTreeSetupEndLabelEdit )
	EVT_TREE_ITEM_MENU( ID_TREE_SETUP, SCDocFrameGUI::_wxFB_OnTreeSetupContextMenu )
	EVT_TREE_SEL_CHANGED( ID_TREE_SETUP, SCDocFrameGUI::_wxFB_OnTreeSetupSelChanged )
	EVT_TREE_SEL_CHANGING( ID_TREE_SETUP, SCDocFrameGUI::_wxFB_OnTreeSetupSelChanging )
END_EVENT_TABLE()

SCDocFrameGUI::SCDocFrameGUI(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString title, const wxPoint pos, const wxSize size, long style, const wxString name) : wxDocParentFrame(manager, parent, id, title, pos, size, style, name)
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxVERTICAL );
	
	m_splitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D);
	m_splitter->Connect( wxEVT_IDLE, wxIdleEventHandler( SCDocFrameGUI::m_splitterOnIdle ), NULL, this );
	m_panelSetup = new wxPanel( m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_treeSetup = new wxTreeCtrl( m_panelSetup, ID_TREE_SETUP, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_EDIT_LABELS|wxTR_HAS_BUTTONS);
	bSizer3->Add( m_treeSetup, 1, wxEXPAND, 5 );
	
	m_panelSetup->SetSizer( bSizer3 );
	m_panelSetup->Layout();
	bSizer3->Fit( m_panelSetup );
	m_panelCtrl = new wxPanel( m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizerCtrl = new wxFlexGridSizer( 2, 2, 0, 0 );
	m_sizerCtrl->SetFlexibleDirection( wxBOTH );
	m_sizerCtrl->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_panelCtrl->SetSizer( m_sizerCtrl );
	m_panelCtrl->Layout();
	m_sizerCtrl->Fit( m_panelCtrl );
	m_splitter->SplitVertically( m_panelSetup, m_panelCtrl, 166 );
	bSizer2->Add( m_splitter, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer2 );
	this->Layout();
}
